<template>

<div>

    购物车组件{{num}}
</div>

</template>
<script setup>
import {defineExpose} from "vue"
import {ref} from "vue"
let num = ref(444)
function fn1(){
  console.log('%%%%%%%%%%%%%%%')
}

// 暴露自己的数据和方法
defineExpose({
    num,
    fn1,
})


</script>